# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# Examples:
#
#   cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
#   Mayor.create(:name => 'Daley', :city => cities.first)


   password_salt = BCrypt::Engine.generate_salt
   password_hash = BCrypt::Engine.hash_secret("123456", password_salt)

   dado_pessoal = DadoPessoal.create(:nome => "Hudson", :cpf => "12345678912", :email => "hudson@gmail.com", :horas_semanais => 20)
   Funcionario.create(:login => "Hudson", :senha_hash => password_hash, :senha_salt => password_salt, :dado_pessoal => dado_pessoal, :admin => true)